#ifndef __FLASH_RW_H__
#define __FLASH_RW_H__
#include <typecomm.h>
#if DEVICE_PLATFORM_CONFIGURE == DEVICE_PLATFORM_LINUX
typedef uint32_t flashAddrType;
#elif DEVICE_PLATFORM_CONFIGURE == DEVICE_PLATFORM_ARM32_MCU
typedef uint32_t flashAddrType;
#elif DEVICE_PLATFORM_CONFIGURE == DEVICE_PLATFORM_C51_MCU
#if DEV_PLAT_51_CHIP_TYPE == DEV_PLAT_51_STC32
typedef uint32_t flashAddrType;
#else
typedef uint16_t flashAddrType;
#endif
#endif

int flashOptRead(flashAddrType flashAddr, void *obuf, int osize);
int flashOptWrite(flashAddrType flashAddr, const void *ibuf, int isize);
#endif
